var getScriptArgs = function() {
    var scripts = document.getElementsByTagName("script");
    var script = scripts[scripts.length - 1],
        src = script.src,
        reg = /(?:\?|&)(.*?)=(.*?)(?=&|$)/g,
        temp, res = {};
    while ((temp = reg.exec(src)) != null) res[temp[1]] = decodeURIComponent(temp[2]);
    return res;
};
var args = getScriptArgs();
var linkLiArr = [],
    num = args.num;
if (!num || num <= 0) {
    num = "2";
}
var linkLi = '<li class="num1">        <a href="http://gk.ahsz.gov.cn/public/column/2655577?type=4&action=list" target="_blank" title="政务公开">        <span class="ico"></span>    <span class="tit">政务公开</span></a></li>';
linkLiArr.push(linkLi);
var linkLi = '<li class="num2">        <a href="/i/128" target="_blank" title="互动交流">        <span class="ico"></span>    <span class="tit">互动交流</span></a></li>';
linkLiArr.push(linkLi);
var printContent = function() {
    var length = linkLiArr.length;
    if (num > length) {
        num = length;
    }
    if (linkLiArr.length > 0) {
        for (var i = 0; i < num; i++) {
            document.write(linkLiArr[i]);
        }
    }
};
printContent();